-- GENERATED SPELL FOR [Sandfury Witch Doctor] --


function spell0_5650(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(17843,pUnit)
pUnit:RegisterEvent('Sorts_5650', 1500, 1)
end

function spell1_5650(pUnit, Event) --@Healing Ward,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(11899,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_5650', 1, 1)
end

function spell2_5650(pUnit, Event) --@Lava Spout Totem,Self--
pUnit:FullCastSpellOnTarget(8264,pUnit)
pUnit:RegisterEvent('Sorts_5650', 20273, 1)
end

function Sorts_5650(pUnit, Event)
local choix_sorts_5650 = math.random(0, 2)
if choix_sorts_5650 == 0 then
pUnit:RegisterEvent('spell0_5650', 1, 1)
end
if choix_sorts_5650 == 1 then
pUnit:RegisterEvent('spell1_5650', 1, 1)
end
if choix_sorts_5650 == 2 then
pUnit:RegisterEvent('spell2_5650', 1, 1)
end
end

function mob5650_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5650', math.random(1500, 3000), 1)
end

function mob5650_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5650_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5650_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5650, 1, 'mob5650_Action')
RegisterUnitEvent(5650, 2, 'mob5650_Leave')
RegisterUnitEvent(5650, 3, 'mob5650_Kill')
RegisterUnitEvent(5650, 4, 'mob5650_Die')
